#include <iostream>
#include <cfenv>


int main() {
    std::cout << "__cplusplus = " << __cplusplus << std::endl;
    std::cout << "Current rounding mode: ";
    switch (std::fegetround()) {
        case FE_TONEAREST:  std::cout << "FE_TONEAREST (to nearest)\n"; break;
        case FE_UPWARD:     std::cout << "FE_UPWARD (upward)\n"; break;
        case FE_DOWNWARD:   std::cout << "FE_DOWNWARD (downward)\n"; break;
        case FE_TOWARDZERO: std::cout << "FE_TOWARDZERO (toward zero)\n"; break;
        default:            std::cout << "Unknown\n"; break;
    }//Current rounding mode: FE_TONEAREST (to nearest)
    
    return 0;
}
